package me.CSmethod.demo.lianxi;

public class Text2 {
    public static void main(String[] args) {
        int a[]={3,5,9,8,7};
        int number=getmax(a);
        System.out.println(number);
    }
    public static int getmax(int a[]){
            int max=a[0];
        for (int i = 0; i < a.length; i++) {
            if(a[i]>=max){
                max=a[i];
            }
        }
        return max;
    }
}
